﻿

// =================================================================== 
// Module说明
//====================================================================
// 创建时间：2018-12-13 22:15:01
// 负责人：Sushee
// ===================================================================

using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using OF.Component.Model;
namespace OF.Component.IDAL
{

    /// <summary>
    ///用户来源 数据访问层接口  
    /// </summary>
    internal partial interface IUserSource
    {

        /// <summary>
        /// 根据断言条件获取单个用户来源
        /// </summary>
        UserSourceInfo QuerySingle(Expression<Func<UserSourceInfo, bool>> predicate);

        /// <summary>
        /// 根据断言条件获获取用户来源列表
        /// </summary>
        IList<UserSourceInfo> QueryList(Expression<Func<UserSourceInfo, bool>> predicate);

        /// <summary>
        /// 根据唯一标识和来源媒体获取信息
        /// </summary>
        /// <param name="sourceToken">唯一标识符</param>
        /// <param name="sourceType">来源媒体</param>
        /// <returns></returns>
        UserSourceInfo GetByToken(string sourceToken, int sourceType);

        UserSourceInfo GetByUserID(long userID);
        

            /// <summary>
            /// 更新用户头像和昵称
            /// </summary>
            /// <param name="userhead"></param>
            /// <param name="username"></param>
            /// <param name="sourceToken"></param>
            /// <param name="sourceType"></param>
            /// <returns></returns>
            int UpdateUserHead(string userhead, string username, string sourceToken,int sourceType);

    }


}